﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsForms.Admin
{
    
    public partial class FormTimKiemNhanVien : Form
    {
        public static FormTimKiemNhanVien formtk = null;
        public static string data;
       public static bool state = false;
        public FormTimKiemNhanVien()
        {
            InitializeComponent();
        }
        public static void Actives(Form formgoi)
        {
            if (formtk == null || formtk.IsDisposed)
            {
                formtk = new FormTimKiemNhanVien();
                formtk.MdiParent = formgoi.MdiParent;
                formtk.Show();

            }
            else
                formtk.Activate();

        }

        private void bttim_Click(object sender, EventArgs e)
        {
            state = true;
            data = tbtim.Text;
            this.Close();
        }

        private void btcancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void FormTimKiemNhanVien_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                bttim.PerformClick();
            }
        }
    }
}
